package com.larry.bp.service;

import com.larry.bp.dao.UserDao;
import com.larry.bp.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    public List<User> findByUserName() {

        List<User> user = null;

        try {

           user= userDao.findAll();

        } catch (Exception e) {
          e.printStackTrace();
        }
        return user;

    }
}
